Skip to content

fix(cli): exit 1 when a command is still waiting after stdin closes - #963

Merged
cpojer merged 3 commits into
mainfrom
fix/cli-closed-stdin-exit
Nov 28, 2026
Merged

cpojer merged 3 commits into
mainfrom
fix/cli-closed-stdin-exit

Conversation

@hyfdev

@hyfdev hyfdev commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

When stdin closes while a Void command is waiting for an answer, the command can exit 0 as if it succeeded. A deployment can instead exit 13 with an unsettled top-level await.

Void now cancels the pending prompt and exits 1 with an error:

$ void db connect --local-only < /dev/null
Standard input closed before the prompt was answered.

Successful piped input and Ctrl+C retain their existing behavior. Commands that never open a prompt, such as seed scripts that read piped input, can finish normally.

Fixes #964

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-cli-closed-stdin-exit-void-cloud.voidzero-docs.workers.dev (commit 9b34b22)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://fd0c054b-void-cloud.voidzero-docs.workers.dev 9b34b22 2026-11-28T11:13:28.335Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2261b180-void-cloud.voidzero-docs.workers.dev 90b33f1 2026-11-28T11:09:05.395Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://4b7a78c0-void-cloud.voidzero-docs.workers.dev 73e69ea 2026-11-28T11:04:11.585Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://02fcaf8e-void-cloud.voidzero-docs.workers.dev 9c6e2a2 2026-11-28T10:38:11.739Z Visit the dashboard ↗

@hyfdev
hyfdev marked this pull request as ready for review November 28, 2026 10:51
Copilot AI balanced review requested due to automatic review settings November 28, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@blacksmith-sh

This comment has been minimized.

@cpojer
cpojer force-pushed the fix/cli-closed-stdin-exit branch from 73e69ea to 90b33f1 Compare November 28, 2026 11:07
@cpojer
cpojer force-pushed the fix/cli-closed-stdin-exit branch from 90b33f1 to 9b34b22 Compare November 28, 2026 11:12

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@cpojer
cpojer merged commit 136a527 into main Nov 28, 2026
26 checks passed
@cpojer
cpojer deleted the fix/cli-closed-stdin-exit branch November 28, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Void commands exit 0 when they are waiting on a prompt and stdin is closed

3 participants